cur_path:=$(shell pwd)
bin_dir:=$(cur_path)/bin
build_dir:=$(cur_path)/Build/$(TARGET_EXAMPLE)


client:
	make make_core TARGET_EXAMPLE=my_client

server:
	make make_core TARGET_EXAMPLE=my_server

make_core:cmake_build
	cd $(build_dir) &&  make -j8 VERBOSE=1;

pre_build:
	mkdir -p $(build_dir)

cmake_build:pre_build
	cd $(build_dir) &&  cmake  ../../$(TARGET_EXAMPLE)  -DBIN_PATH=$(bin_dir) 

clean:
	rm -rf $(cur_path)/Build
	rm -rf $(bin_dir)


